<?php
namespace Home\Controller;
use Think\Controller;

// 开发者：杨晓杰，
// 邮箱：2902468225@qq.com 


class LikeController extends Controller{
	private $dbName='like';
	public function myLike(){
		tag('func2');
		$where['like_type']=0;
		$where['std_id']=$_ENV['user']['id'];
		$all=M($this->dbName)->join('__CAMPANY__ ON __LIKE__.cam_id = __CAMPANY__.id')->where($where)->order('like_time desc')->select();
		$data=R('Myfunc/Myfunc/pageDeal',array('data'=>$all));

		$this->assign('data',$data);
		// dump($data);
		R('Page/myLike');
	}
	public function likeMe(){
		tag('func2');
		$data=$this->likeMeContent();
		$this->assign('data',$data);
		// dump($data);
		R('Page/likeMe');
	}
	public function likeMeContent(){
		tag('func2');
		$where['like_type']=1;
		$where['std_id']=$_ENV['user']['id'];
		$all=M($this->dbName)->join('__CAMPANY__ ON __LIKE__.cam_id = __CAMPANY__.id')->where($where)->order('like_time desc')->select();
		$data=R('Myfunc/Myfunc/pageDeal',array('data'=>$all));
		return $data;
	}
}